package com.sgb.kjwl.pop;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.sgb.kjwl.R;
import com.sgb.kjwl.model.entity.GoodsSkuDetailEntity;
import com.swgk.core.util.UiUtil;

import razerdp.basepopup.BasePopupWindow;

/**
 * 作者:张磊
 * 日期:2019/10/24
 * 说明:选择样式
 */
public class StylePop extends BasePopupWindow {

    public GoodsSkuDetailEntity data;

    public StylePop(Context context) {
        super(context);
    }

    @Override
    public View onCreateContentView() {
        View v = createPopupById(R.layout.style_pop);
        ImageView iv_img = v.findViewById(R.id.iv_img);
        TextView tv_name = v.findViewById(R.id.tv_name);
        TextView tv_price = v.findViewById(R.id.tv_price);
        TextView tv_cx_time = v.findViewById(R.id.tv_cx_time);
        TextView tv_all_price = v.findViewById(R.id.tv_all_price);
        Glide.with(UiUtil.getContext()).load(data.getImages().get(0)).into(iv_img);
        tv_name.setText(data.getCartTitle());


        return v;
    }


}
